<include file="public:head"/>
<div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper">
    <div class="mui-scroll">
        <!--banner-->
        <div id="slider" class="mui-slider banner">
            <div class="mui-slider-group">
                <volist name="ad_list" id="ad">
                    <div class="mui-slider-item">
                        <a href="{$ad.url}">
                            <img src="{$ad.img}">
                        </a>
                    </div>
                </volist>
            </div>
            <div class="mui-slider-indicator">
                <volist name="ad_list" id="ad">
                    <div class="mui-indicator"></div>
                </volist>
            </div>
        </div>
        <!--nav-->
        <div class="nav mui-clearfix">
            <ul>
                <li><a href="{:U('list/index')}"><img src="__STATIC__/tqkwap/images/icon01.png">
                        <p>全部商品</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'1'))}"><img src="__STATIC__/tqkwap/images/icon02.png">
                        <p>时尚女装</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'2'))}"><img src="__STATIC__/tqkwap/images/icon03.png">
                        <p>精品男装</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'3'))}"><img src="__STATIC__/tqkwap/images/icon04.png">
                        <p>鞋包配饰</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'6'))}"><img src="__STATIC__/tqkwap/images/icon05.png">
                        <p>美妆洗护</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'8'))}"><img src="__STATIC__/tqkwap/images/icon06.png">
                        <p>美食小吃</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'9'))}"><img src="__STATIC__/tqkwap/images/icon07.png">
                        <p>内衣裤袜</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'10'))}"><img src="__STATIC__/tqkwap/images/icon08.png">
                        <p>数码家电</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'12'))}"><img src="__STATIC__/tqkwap/images/icon09.png">
                        <p>家居用品</p></a></li>
                <li><a href="{:U('list/index',array('cid'=>'19'))}"><img src="__STATIC__/tqkwap/images/icon11.png">
                        <p>公司转让</p></a></li>
                <!--<li><a href="{*{:U('article/index')}*}"><img src="__STATIC__/tqkwap/images/icon10.png"><p>优惠券头条</p></a></li>-->
            </ul>
        </div>
        <!--toutiao-->
        <div class="toutiao mui-clearfix">
            <a href="{:U('article/index')}"><img src="__STATIC__/tqkwap/images/toutiao.png" class="mui-pull-left"></a>
            <div class="notice mui-pull-right">
                <div class="notes mui-clearfix">
                    <div class="bd">
                        <ul>
                            <volist name="article_list" id="article">
                                <li>
                                    <a href="<if condition=" C('APP_SUB_DOMAIN_DEPLOY')">/article/view_{$article.id} <else/>
                                    {:U('/m/article/read',array('id'=>$article['id']))}</if>">{$article.title}</a>
                                </li>
                            </volist>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!--polular-->
        <div class="popular">

            <!--main-->

            <form action="/?g=m&m=jump" id="jump" method="post">
                <div style="clear: both;"></div>
                <div id="refreshContainer">
                    <div class="goods-list am-cf list-wrapper" style="padding-top: 10px;">
                        <volist name='list' id="vo">
                            <if condition="$vo['coupon_click_url'] neq '' ">
                                <div class="goods-item">
                                    <div class="tqk_pic">
                                        <a data-transition="slide" rel="{$vo.quan}" data-cnzz="{$vo.num_iid}" quanurl="{$vo.coupon_click_url}" href="javascript:;" class="img QtkSelfClick jump">
                                            <if condition="$vo['is_new'] eq 1">
                                                <span class="today-wrapper">
                                                    <span>今日</span>
                                                    <span>新品</span>
                                                </span>
                                            </if>
                                            <if condition="$vo.isq eq 1">
                                                <img src="{$vo.pic_url}_400x400">
                                                <else/>
                                                <img src="{$vo.pic_url}">
                                            </if>
                                        </a>
                                    </div>
                                    <a data-transition="slide" href="javascript:;" class="title QtkSelfClick">
                                        <div class="text" style=" color:#777777;">{$vo.title}</div>
                                    </a>
                                    <if condition="$vo.isq eq 1">
                                        <div class="tqkprice">
                                            <span class="text">券后:￥{$vo.coupon_price}</span>
                                            <label>领券省{$vo.quan}元</label>
                                        </div>
                                        <div class="price-wrapper">
                                            <span class="text tqkico" style="padding-top: 4px;">
                                                <if condition="$vo.shop_type eq 'B'">天猫<else/>淘宝</if>在售
                                            </span>
                                            <span class="price">{$vo.price}元</span>
                                            <div class="sold-wrapper">
                                                <span class="sold-num" style="font-size: 10px;">{$vo.volume}</span>
                                                <span class="text" style="font-size: 10px;">人已买</span>
                                            </div>
                                        </div>
                                        <else/>
                                        <div class="tqkprice">
                                            <span class="text">预估价:￥{$vo.price}</span>
                                        </div>
                                        <div class="price-wrapper">
                                            <span class="text tqkico" style="padding-top: 4px;">
                                            </span>
                                            <span class="price"></span>
                                            <div class="sold-wrapper">
                                                <span class="sold-num" style="font-size: 10px;">{$vo.hits}</span>
                                                <span class="text" style="font-size: 10px;">人已查看</span>
                                            </div>
                                        </div>
                                    </if>
                                </div>
                            <else/>
                                <div class="goods-item">
                                    <div class="tqk_pic">
                                        <a data-transition="slide" href="{$vo.linkurl}" class="img QtkSelfClick">
                                            <if condition="$vo['is_new'] eq 1">
                                                <span  class="today-wrapper">
                                                    <span>今日</span>
                                                    <span>新品</span>
                                                </span>
                                            </if>
                                            <if condition="$vo.isq eq 1">
                                                <img src="{$vo.pic_url}_400x400">
                                                <else/>
                                                <img src="{$vo.pic_url}">
                                            </if>
                                        </a>
                                    </div>
                                    <a data-transition="slide" href="{$vo.linkurl}" class="title QtkSelfClick">
                                        <div class="text" style=" color:#777777;">{$vo.title}</div>
                                    </a>
                                    <if condition="$vo.isq eq 1">
                                        <div class="tqkprice">
                                            <span class="text">券后:￥{$vo.coupon_price}</span>
                                            <label>领券省{$vo.quan}元</label>
                                        </div>
                                        <div class="price-wrapper">
                                            <span class="text tqkico" style="padding-top: 4px;">
                                                <if condition="$vo.shop_type eq 'B'">天猫
                                                <else/>淘宝
                                                </if>在售
                                            </span>
                                            <span class="price">{$vo.price}元</span>
                                            <div class="sold-wrapper">
                                                <span class="sold-num"  style="font-size: 10px;">{$vo.volume}</span>
                                                <span class="text" style="font-size: 10px;">人已买</span>
                                            </div>
                                        </div>
                                        <else/>
                                        <div class="tqkprice">
                                            <span class="text"><if condition="$vo.price eq 0"> 暂无报价，请联系客服<else/> 预估价:￥{$vo.price}</if></span>
                                        </div>

                                        <div class="price-wrapper">
                                            <span class="text tqkico" style="padding-top: 4px;">
                                            </span>
                                            <span class="price"></span>
                                            <div class="sold-wrapper" style="right:27px">
                                                <span class="sold-num" style="font-size: 10px;">{$vo.hits}</span>
                                                <span class="text" style="font-size: 10px;">人已查看</span>
                                            </div>
                                        </div>
                                    </if>
                                </div>
                            </if>

                        </volist>

                        <div class="mui-text-center">
                            <a href="{:U('list/index',array('p'=>2))}" class="mui-btn">查看更多优惠商品</a>
                        </div>
                    </div>
                    <input type="hidden" id="item" name="item" value=""/>
                    <input type="hidden" id="quan" name="quan" value=""/>
                    <input type="hidden" id="quanurl" name="quanurl" value=""/>

                </div>
            </form>


        </div>
        <!--add-->

    </div>
    <a id="scrollToTop" class="backTop hide"> <span class="iconfont icon-top"></span> </a>
</div>
<include file="public:foot"/>
<script>
    mui('.mui-scroll-wrapper').scroll({
        deceleration: 0.002,
        indicators: false
    });
    var offCanvasWrapper = mui('#offCanvasWrapper');
    var offCanvasInner = offCanvasWrapper[0].querySelector('.mui-inner-wrap');
    var offCanvasSide = document.getElementById("offCanvasSide");
    var classList = offCanvasWrapper[0].classList;
    classList.add('mui-slide-in');
    offCanvasWrapper.offCanvas().refresh();
    //主界面和侧滑菜单界面均支持区域滚动；
    mui('#offCanvasSideScroll').scroll();
    mui('#offCanvasContentScroll').scroll({
        deceleration: 0.002,
        indicators: false
    });
    var slider = mui("#slider");
    slider.slider({
        interval: 3000
    });
    offCanvasInner.addEventListener('drag', function (event) {
        event.stopPropagation();
    });
    jQuery(".notes").slide({mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:true});
    var scrollToTopBox = document.getElementById('scrollToTop');
    scrollToTopBox.addEventListener('tap', function (e) {
        e.stopPropagation();
        mui('#offCanvasContentScroll').scroll().scrollTo(0, 0, 1000);
        window.scrollTo(0, 1000);
    });
</script>
<if condition="$alertadv">
    <script src="__STATIC__/tqkwap/layer/layer.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC__/tqkwap/js/clipboard.min.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">
        /*activity*/
        .layui-layer-nobg{background: transparent!important;box-shadow: none!important;} #activity {position: relative;} #activity .cancel{position: absolute;top: 0;right: 14%;width: 8%;height: 8%;} .actcopy

        {position: absolute;left: 50%;margin-left: -28%;bottom: 8%;width: 56%;height: 9%;background: none;border: none;}
    </style>
    <div id="activity">
        <img src="__STATIC__/tqkpc/images/wap11.png" width="100%"/>
        <label class="cancel"></label>
        <button class="actcopy" data-clipboard-action="copy" data-clipboard-text="{$alertadv.url}"></button>
    </div>
    <script>
        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            area: '100%',
            offset: '80px',
            skin: 'layui-layer-nobg', //没有背景色
            shadeClose: true,
            content: $('#activity'),
            success: function (layero, index) {
                $('.cancel').click(function () {
                    layer.close(index);
                })
            },
        });
        new Clipboard('.actcopy');
        $('.actcopy').on('click', function () {
            layer.msg('淘口令复制成功，打开淘宝App即可拆红包', {time:2000});
        })
    </script>
</if>